package cn.tedu.spring.resource;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * @Author: Miyako
 * @Date: 2024-08-02-16:44
 * @Description: 测试JDK自带的使用Resource注解来找到并创建ResMapper的其中一个实现对象
 */
public class testWeiboMapper {
    public static void main(String[] args) {
        ApplicationContext Context = new AnnotationConfigApplicationContext("cn.tedu.spring.resource");
        while (true) {
           new Thread(()->{
                weiboMapper bean = Context.getBean(weiboMapper.class);
                System.out.println(bean);
            }).start();
        }
//        weiboMapper bean1 = Context.getBean(weiboMapper.class);
//        System.out.println(bean1);
//        weiboMapper bean2 = Context.getBean(weiboMapper.class);
//        System.out.println(bean2);

    }
}
